home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1083 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  4.8 KB

  1. Path: news.mindlink.net!news
  2. From: genew@mindlink.bc.ca (Gene Wirchenko)
  3. Newsgroups: comp.edu,comp.lang.c,comp.lang.c++
  4. Subject: Re: C or C++ for a 14-year old?
  5. Date: Tue, 09 Jan 1996 06:15:33 GMT
  6. Organization: MIND LINK! - British Columbia, Canada
  7. Message-ID: <4ct1e5$kpc@fountain.mindlink.net>
  8. References: <4b30ld$lp2$1@mhafc.production.compuserve.com> <w31V7MD4ED1aLz3@dexam.another.gun.de> <dschrage.23.152EBB70@indirect.com> <4cq6cr$t51@dub-news-svc-1.compuserve.com> <4cqhu3$1quo@news.gate.net> <qq4tu6nr5t.fsf@tartarus.ucsd.edu>
  9. NNTP-Posting-Host: line066.nwm.mindlink.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. djohnson@tartarus.ucsd.edu (Darin Johnson) wrote:
  13.  
  14. >bhutto@gate.net (William Hutto) writes:
  15. >> 10 FOR I=1 TO 10
  16. >> 20 PRINT "YOUR NAME HERE"
  17. >> 30 NEXT I
  18. >> 40 END
  19. >> 
  20. >> RUN
  21.  
  22. >That's much of the problem with BASIC.  More modern BASIC's are
  23. >better than this, why go back to the 70's way of doing things?
  24. >You don't need a label on every line.  It just makes things
  25. >harder (renumber is a kluge to get around a bad feature).
  26.  
  27. >What about
  28.  
  29. >    For I=1 to 10
  30. >    print "your name here"
  31. >    next i
  32. >    end
  33.  
  34.      Indenting has become popular since the seventies, too.
  35.  
  36. >With no labels.  Or better yet, forget the wierd for statment
  37. >(that was very hard for me to grasp when I first saw it, because
  38. >first I kept trying to fit the English meaning of the words into
  39. >place, and second, it wasn't explained that this was just a shortcut
  40. >for a while statement)
  41.  
  42.      for i=1 to 10 ::= for the cases of i from 1 to 10.  English fits
  43. just fine.
  44.  
  45. >Personally, I think it's just as easy for a beginner to understand
  46.  
  47. >   i = 1
  48. >   while i <= 10
  49. >      print "your name here"
  50. >   done
  51.  
  52. >Not only is it easy to understand, you start to see statements in
  53.  
  54.      It's easy?  Well, then it's a pity you got it wrong.  Try
  55. incrementing i in your loop.  Of course, a for-next loop handles that
  56. for you.
  57.  
  58. >terms of groups of statements, not a sequential list.  You start
  59. >to see programs as a hierarchical structure, not a flowchart.
  60. >And when you get to BASIC programs of over 50 lines, things get
  61. >ugly *fast*.  Why should the beginner struggle deciphering a few
  62. >pages of BASIC code, when they could breeze through the same amount
  63. >if it were written in a Pascal like language?
  64.  
  65.      Modern BASICs are very Pascal-like.  Remember, this isn't the
  66. seventies.  Oh, yeah.  Which language requires you to declare labels
  67. which can only be numeric?  Gimme a "p", gimme...
  68.  
  69. >[C program removed]
  70. >>     This *program* requires considerably more explanation. Also, if this 
  71. >> is not a C *interpreter* the student needs to know something about compilation 
  72. >> and may even need to know about files and linking.
  73.  
  74. >Yes, C isn't so great for the beginner.  Elementary Pascal programs
  75. >aren't so bad.  There's a little preamble, but simpler than C, and
  76. >far fewer "just do it that way, I'll explain later".
  77.  
  78. >>     The ultimate *destination* might be a commonly used/accepted language. 
  79. >> I went from BASIC to 6502 assembly language, 8086 assembly language, C, C++ 
  80. >> and then Pascal. When I got to Pascal I thought, "Oops, wrong way!" 
  81. >>     I almost wanted to say, start with assembler.
  82.  
  83. >First thing I did was Cardiac - a cardboard instructional aid to
  84.  
  85.      CARDIAC: "CARDboard Illustrative Aid to Computing".  Me too!  I'd
  86. like to find one of the kits.  If anyone knows, please let me know.
  87. Did you ever figure out how to boot a program using CARDIAC?  It took
  88. me years to figure it out.
  89.  
  90. >computers (yeah right, no one had computers back then, at least no in
  91. >hick towns).  Then something that had relays and such, looking a lot
  92. >like a sturdy version of the radioshack electronics kits.  Then I got
  93. >access to a real computer, and did a bit of assembler.  Then I looked
  94. >over at the TSR machine next to the Altair and said, hey, that's a lot
  95.  
  96.      TRS-80.  An IBM pc is a TSR machine <g>.
  97.  
  98. >simpler, and I don't have to punch in a bunch of bootup code either
  99. >:-) Then I did a bunch of basic, hurting my head trying to decipher
  100. >the long programs.
  101.  
  102. >Then I saw Pascal in college, and for the first time, I related
  103. >programs to math, and things were elegant, not a jumble of code.
  104. >Things were abstract, not tied to the nuts and bolts of the machine.
  105. >It was just so vastly different from the way I had looked at things
  106. >before.  You could actually write huge programs and be able to
  107. >understand it for once.  So maybe, there's still a little bit of me
  108. >that thinks the beginner should do things the hard way, just to get a
  109. >better appreciation of high level languages (and then I wise up and
  110. >realize that the lesson would be lost on 90% of the them).
  111. >-- 
  112. >Darin Johnson
  113. >djohnson@ucsd.edu --  Strange things are afoot at the circle-K...
  114.  
  115. Sincerely,
  116.  
  117. Gene Wirchenko
  118.  
  119. C Pronunciation Guide:
  120.      y=x++;     "wye equals ex plus plus semicolon"
  121.      x=x++;     "ex equals ex doublecross semicolon"
  122.  
  123.